import { SnowflakeId } from '@akashrajpurohit/snowflake-id'

function UniqueID(mid) {
  const snowflake = SnowflakeId({
    workerId: mid,
    epoch: (2024 - 1970) * 31536000 * 1000,
  })
  return snowflake.generate()
}

function DeepCopy(obj) {
  return JSON.parse(JSON.stringify(obj))
}

function IsMac() {
  return process.platform === 'darwin'
}

export { DeepCopy, UniqueID, IsMac }
